package com.artron.mediaartron.data.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Class description here
 *
 * @author doing
 * @version 1.0.0
 * @since 2017-11-02.
 */

public class OrderContentData implements Parcelable, IsLoadMore<OrderContentData.OrderListBean> {



    /**
     * isMore : false
     * orderList : [{"consigneeDetailAddress":"广东省深圳市福田区étude hue","orderId":"85ff6c46d8a34a96a73567f7d9d60a12","totalPrice":299,"worksList":[{"worksTypeCode":"kuanghua","worksColor":"","worksQuantity":1,"worksId":"ee0fabfd835c459eb04e4c3e5a20fa1a","worksName":null,"worksSize":"500X500","worksPrice":299,"worksShape":"银平面铝框"}],"couponDiscountAmount":0,"consigneeMobileCode":"3576466544","consigneeName":"cccccccccccc","totalQuantity":1,"statusName":"已创建","orderCode":"201711021611593663","couponCode":"","passportId":"45384e41fed4448bae34fafbb3053d21","createDate":"2017-11-02","status":1},{"consigneeDetailAddress":"广东省深圳市福田区étude hue","orderId":"d2216a80e19544db8b7b3009c12f1e16","totalPrice":299,"worksList":[{"worksTypeCode":"kuanghua","worksColor":"","worksQuantity":1,"worksId":"184fc64b0487486b81218d7c02efb95a","worksName":null,"worksSize":"500X500","worksPrice":299,"worksShape":"银平面铝框"}],"couponDiscountAmount":0,"consigneeMobileCode":"3576466544","consigneeName":"cccccccccccc","totalQuantity":1,"statusName":"已创建","orderCode":"201711021610487997","couponCode":"","passportId":"45384e41fed4448bae34fafbb3053d21","createDate":"2017-11-02","status":1},{"consigneeDetailAddress":"广东省深圳市福田区étude hue","orderId":"9f65fb6d4e75406cb2dfd0661fb2ffd8","totalPrice":299,"worksList":[{"worksTypeCode":"kuanghua","worksColor":"","worksQuantity":1,"worksId":"66881041c73b4115a29a2b2ae23485c1","worksName":null,"worksSize":"500X500","worksPrice":299,"worksShape":"银平面铝框"}],"couponDiscountAmount":0,"consigneeMobileCode":"3576466544","consigneeName":"cccccccccccc","totalQuantity":1,"statusName":"已创建","orderCode":"201711021610886282","couponCode":"","passportId":"45384e41fed4448bae34fafbb3053d21","createDate":"2017-11-02","status":1},{"consigneeDetailAddress":"广东省深圳市福田区étude hue","orderId":"6a72c9e149834f59b8d3296a4b8ab5a1","totalPrice":299,"worksList":[{"worksTypeCode":"kuanghua","worksColor":"","worksQuantity":1,"worksId":"108494f6e98e448aa1c3c3c7bf3626ef","worksName":null,"worksSize":"500X500","worksPrice":299,"worksShape":"银平面铝框"}],"couponDiscountAmount":0,"consigneeMobileCode":"3576466544","consigneeName":"cccccccccccc","totalQuantity":1,"statusName":"推送给MES","orderCode":"201711021609848319","couponCode":"","passportId":"45384e41fed4448bae34fafbb3053d21","createDate":"2017-11-02","status":6}]
     */

    private boolean isMore;
    /**
     * consigneeDetailAddress : 广东省深圳市福田区étude hue
     * orderId : 85ff6c46d8a34a96a73567f7d9d60a12
     * totalPrice : 299
     * worksList : [{"worksTypeCode":"kuanghua","worksColor":"","worksQuantity":1,"worksId":"ee0fabfd835c459eb04e4c3e5a20fa1a","worksName":null,"worksSize":"500X500","worksPrice":299,"worksShape":"银平面铝框"}]
     * couponDiscountAmount : 0
     * consigneeMobileCode : 3576466544
     * consigneeName : cccccccccccc
     * totalQuantity : 1
     * statusName : 已创建
     * orderCode : 201711021611593663
     * couponCode :
     * passportId : 45384e41fed4448bae34fafbb3053d21
     * createDate : 2017-11-02
     * status : 1
     */

    private List<OrderListBean> orderList;

    public boolean isIsMore() {
        return isMore;
    }

    public void setIsMore(boolean isMore) {
        this.isMore = isMore;
    }

    public List<OrderListBean> getOrderList() {
        return orderList;
    }

    public void setOrderList(List<OrderListBean> orderList) {
        this.orderList = orderList;
    }

    @Override
    public boolean isMore() {
        return isMore;
    }

    @Override
    public List<OrderListBean> getList() {
        return orderList;
    }

    public static class OrderListBean {
        private String consigneeDetailAddress;
        private String orderId;
        private int totalPrice;
        private int couponDiscountAmount;
        private String consigneeMobileCode;
        private String consigneeName;
        private int totalQuantity;
        private String statusName;
        private String orderCode;
        private String couponCode;
        private String passportId;
        private String createDate;
        private int status;


        /**
         * worksTypeCode : kuanghua
         * worksColor :
         * worksQuantity : 1
         * worksId : ee0fabfd835c459eb04e4c3e5a20fa1a
         * worksName : null
         * worksSize : 500X500
         * worksPrice : 299
         * worksShape : 银平面铝框
         */

        private List<WorksListBean> worksList;

        public String getConsigneeDetailAddress() {
            return consigneeDetailAddress;
        }

        public void setConsigneeDetailAddress(String consigneeDetailAddress) {
            this.consigneeDetailAddress = consigneeDetailAddress;
        }

        public String getOrderId() {
            return orderId;
        }

        public void setOrderId(String orderId) {
            this.orderId = orderId;
        }

        public int getTotalPrice() {
            return totalPrice;
        }

        public void setTotalPrice(int totalPrice) {
            this.totalPrice = totalPrice;
        }

        public int getCouponDiscountAmount() {
            return couponDiscountAmount;
        }

        public void setCouponDiscountAmount(int couponDiscountAmount) {
            this.couponDiscountAmount = couponDiscountAmount;
        }

        public String getConsigneeMobileCode() {
            return consigneeMobileCode;
        }

        public void setConsigneeMobileCode(String consigneeMobileCode) {
            this.consigneeMobileCode = consigneeMobileCode;
        }

        public String getConsigneeName() {
            return consigneeName;
        }

        public void setConsigneeName(String consigneeName) {
            this.consigneeName = consigneeName;
        }

        public int getTotalQuantity() {
            return totalQuantity;
        }

        public void setTotalQuantity(int totalQuantity) {
            this.totalQuantity = totalQuantity;
        }

        public String getStatusName() {
            return statusName;
        }

        public void setStatusName(String statusName) {
            this.statusName = statusName;
        }

        public String getOrderCode() {
            return orderCode;
        }

        public void setOrderCode(String orderCode) {
            this.orderCode = orderCode;
        }

        public String getCouponCode() {
            return couponCode;
        }

        public void setCouponCode(String couponCode) {
            this.couponCode = couponCode;
        }

        public String getPassportId() {
            return passportId;
        }

        public void setPassportId(String passportId) {
            this.passportId = passportId;
        }

        public String getCreateDate() {
            return createDate;
        }

        public void setCreateDate(String createDate) {
            this.createDate = createDate;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public List<WorksListBean> getWorksList() {
            return worksList;
        }

        public void setWorksList(List<WorksListBean> worksList) {
            this.worksList = worksList;
        }

        public static class WorksListBean {
            private String worksTypeCode;
            private String worksColor;
            private int worksQuantity;
            private String worksId;
            private String worksName;
            private String worksSize;
            private int worksPrice;
            private String worksShape;
            /**
             * thumbnailPath : http://test2.artup.com/edited/final/2017/11/3/45384e41fed4448bae34fafbb3053d21/412b27efa19f4345825a1fa9cf7f3cc2_200.jpg
             */

            private String thumbnailPath;


            public String getWorksTypeCode() {
                return worksTypeCode;
            }

            public void setWorksTypeCode(String worksTypeCode) {
                this.worksTypeCode = worksTypeCode;
            }

            public String getWorksColor() {
                return worksColor;
            }

            public void setWorksColor(String worksColor) {
                this.worksColor = worksColor;
            }

            public int getWorksQuantity() {
                return worksQuantity;
            }

            public void setWorksQuantity(int worksQuantity) {
                this.worksQuantity = worksQuantity;
            }

            public String getWorksId() {
                return worksId;
            }

            public void setWorksId(String worksId) {
                this.worksId = worksId;
            }

            public String getWorksName() {
                return worksName;
            }

            public void setWorksName(String worksName) {
                this.worksName = worksName;
            }

            public String getWorksSize() {
                return worksSize;
            }

            public void setWorksSize(String worksSize) {
                this.worksSize = worksSize;
            }

            public int getWorksPrice() {
                return worksPrice;
            }

            public void setWorksPrice(int worksPrice) {
                this.worksPrice = worksPrice;
            }

            public String getWorksShape() {
                if ("外观尺寸".equals(worksShape)) {
                    return "";
                }

                return worksShape;
            }

            public void setWorksShape(String worksShape) {
                this.worksShape = worksShape;
            }

            public String getThumbnailPath() {
                return thumbnailPath;
            }

            public void setThumbnailPath(String thumbnailPath) {
                this.thumbnailPath = thumbnailPath;
            }
        }
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByte(this.isMore ? (byte) 1 : (byte) 0);
        dest.writeList(this.orderList);
    }

    public OrderContentData() {
    }

    protected OrderContentData(Parcel in) {
        this.isMore = in.readByte() != 0;
        this.orderList = new ArrayList<OrderListBean>();
        in.readList(this.orderList, OrderListBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<OrderContentData> CREATOR = new Parcelable.Creator<OrderContentData>() {
        @Override
        public OrderContentData createFromParcel(Parcel source) {
            return new OrderContentData(source);
        }

        @Override
        public OrderContentData[] newArray(int size) {
            return new OrderContentData[size];
        }
    };
}
